<div id="page-header">
<div class="blue large">
    <a href="/admin/category/index">Danh sách tất cả sản phẩm</a> | 
    <a href="/admin/item/add">Thêm Sản Phẩm</a>
</div>
<br />
<br class="cl" />
<br class="cl" />

<h1>Danh sách sản phẩm</h1>
<br class="cl" />

 <p>
            <label for="Pellentesque">Ngôn ngữ:</label>
            <select name="select" size="1">
                  <option value="1" selected="selected">Tiếng Việt</option>
                  <option value="2">Tiếng Anh</option>
                  <option value="3">Tiếng Nhật</option>
            </select>
</p>
<br class="cl" />
<section class="grid_9" id="dashtabs">
        <div id="dashtabs-pages" class="box-content no-padding">
          <table class="table no-border">
            <thead>
              <tr>
                <td class="tc checkbox"><input class="check-all" type="checkbox"></td>
                <td>Name</td>
                <td>Cateogry</td>
                <td>Created</td>
                <td>Order</td>
                <td class="last">Options</td>
              </tr>
            </thead>
            <tbody>
            <?php foreach($listItem as $item) {; ?>
              <tr>
                <td class="tc"><input type="checkbox"></td>
                <td><a href="/admin/item/edit/<?php echo $item['id'];?>"><?php echo $item['name_vn']; ?></td>
                <td><?php echo $item['name_vn']; ?></td>
                
                <td><?php echo date('d-m-Y',$item['create_time']); ?></td>
                <td><?php echo $item['order_id']; ?></td>

                <td class="last">
                    <a href="/admin/item/edit/<?php echo $item['id']; ?>" class="tooltip" title="Edit Page"><img alt="edit page" src="/../../images/admin/icons/16/page_edit.png"></a> 
                    <a onclick="return deleteItem(<?php echo $item['id']; ?>);" href="/admin/item/delete/<?php echo $item['id'].'/'.$productId ; ?>" class="tooltip" title="Delete Page"><img alt="delete page" src="/../../images/admin/icons/16/page_delete.png"></a>
                </td>
              </tr>
              <?php }; ?>
              
            </tbody>
          </table>
        </div>
        <div class="box-footer">
          <?php echo $this->pagination->create_links(); ?>
          </div>
    </section>
    
     
     
</div>
<br class="cl" />
</div>
<script type="text/javascript">
    function deleteItem(item_id) {
        var agree=confirm("Are you sure you want to delete this item ?");
        if (agree)
             return true;
        else
             return false;
    }
</script>